﻿#ifndef CUSERINFOMGR_H
#define CUSERINFOMGR_H

#include <QObject>
#include <devicemodel/CUserInfo.h>
#define ADDR QString("http://192.168.2.8:9999")
class CUserInfoMgr : public QObject
{
    Q_OBJECT
    explicit CUserInfoMgr(QObject *parent = nullptr);
public:
    static CUserInfoMgr& ins();

    void setInfo(bool state, CUserInfo& info, QString token);

    const CUserInfo& info();

    inline bool loginState(){ return m_isLogin;}

    QString token();

signals:

private:
    bool m_isLogin;
    CUserInfo m_info;
    QString m_token;
};

#endif // CUSERINFOMGR_H
